package com.itheima.Mapper;

import com.itheima.pojo.User;
import com.itheima.pojo.insert;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface UserMapper {
    @Select("Select * from user where class_id=#{classId} and role_id=#{role_id}")
    List<User> SelectByClassId(@Param("classId")String classId,@Param("role_id") int role_id);

    @Select("Select sum(Integral) from user where group_name=#{groupName}")
    int SelectGroup(String groupName);

    @Update("Update user set integral=#{integral} where id =#{id}")
    int InsertIntegral(insert insert);

//    @Select("Select group_name from user where class_id=#{classId} ")
//    Set<ks_group> SelectByClassId2(User user);
//
//    @Select("Select * from user where group_name = #{group_name} ")
//    List<User>  SelectByClassId3(ks_group ks_group);
}
